﻿// Decompiled with JetBrains decompiler
// Type: MCM.LightInject.ServiceRegistration
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using System.Diagnostics.CodeAnalysis;

#nullable disable
namespace MCM.LightInject
{
  [ExcludeFromCodeCoverage]
  internal class ServiceRegistration : Registration
  {
    public string ServiceName { get; set; } = string.Empty;

    public ILifetime Lifetime { get; set; }

    public object Value { get; set; }

    public override int GetHashCode()
    {
      return this.ServiceType.GetHashCode() ^ this.ServiceName.GetHashCode();
    }

    public override bool Equals(object obj)
    {
      return obj is ServiceRegistration serviceRegistration && this.ServiceName == serviceRegistration.ServiceName && this.ServiceType == serviceRegistration.ServiceType;
    }

    public override string ToString()
    {
      return string.Format("ServiceType: '{0}', ServiceName: '{1}', ImplementingType: '{2}', Lifetime: '{3}'", (object) this.ServiceType, (object) this.ServiceName, (object) this.ImplementingType, (object) (this.Lifetime?.ToString() ?? "Transient"));
    }
  }
}
